import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个数:");
        int num = sc.nextInt();
    }
    public static void main1(String[] args) {
        String key = "abc123";
        int count = 3;
        Scanner sc = new Scanner(System.in);
        while(true) {
            System.out.print("请输入字符串:");
            String str = sc.nextLine();
            if (str.equals(key)) {
                System.out.println("登录成功");
                break;
            }
            else {
                if (count == 1) {
                    System.out.println("你已用完三次机会!");
                    break;
                }
                count--;
                System.out.println("输入错误，你还有"+count+"次机会!");
            }
        }
    }
}
